package com.sinping.qh.query.base;

import lombok.Data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author zhangjin
 * @create 2018/6/26
 */
@Data
public class ValidLabQuery implements QueryParams,Serializable {

    static Map<String, String> aliasMap = new HashMap<>();
    static Map<String, Operator> operatorMap = new HashMap<>();

    /**
     * 检查实验室
     */
    private List<String> checkLabId;


    static {
        aliasMap.put("checkLabId","check_lab_id");

       operatorMap.put("checkLabId",Operator.in);
    }

    @Override
    public String getAlias(String fieldName) {
        return aliasMap.getOrDefault(fieldName, fieldName);
    }

    @Override
    public Operator getOperators(String fieldName) {
        return operatorMap.getOrDefault(fieldName, Operator.eq);
    }
}

